import { reactive } from "vue";
import type { FormRules } from "element-plus";

/** 自定义表单规则校验 */
export const formRules = reactive(<FormRules>{
  name: [{ required: true, message: "角色名称为必填项", trigger: "blur" }],
  code: [{ required: true, message: "角色标识为必填项", trigger: "blur" }],
  currency: [{ required: true, message: "结算币种为必填", trigger: "blur" }],
  rate: [{ required: true, message: "汇率为必填", trigger: "blur" }],
  profit_offset: [{ required: true, message: "利润偏移量为必填", trigger: "blur" }],
  admin_id: [{ required: true, message: "店铺管理员为必填", trigger: "blur" }],
  api_url: [{ required: true, message: "接口网址为必填", trigger: "blur" }],
  group: [{ required: true, message: "店铺分组为必填", trigger: "blur" }],
});
